package com.rockcent.mall.lib.domain;

import com.rockcent.common.domain.IDEntityMall;
import com.rockcent.mall.lib.domain.enumclass.MerchantRechargePaymentStatus;
import com.rockcent.mall.lib.domain.enumclass.PaymentMethod;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by Marco on 17-3-29.
 */
@Entity
@Table(name = "merchant_recharge_payment_flow")
@DynamicInsert(value = true)
@DynamicUpdate(value = true)
public class MerchantRechargePaymentFlow extends IDEntityMall {

    @Column(columnDefinition = "DECIMAL(30,10) comment '充值金额'")
    private BigDecimal rechargeAmount;
    @Column(columnDefinition = "bigint comment '平台 id'")
    private Long mallId;
    @Column(columnDefinition = "bigint comment '商户 id'")
    private Long merchantId;
    @Column(columnDefinition = "varchar(30) comment '支付方式'")
    @Enumerated(EnumType.STRING)
    private PaymentMethod paymentMethod;
    @Column(columnDefinition = "varchar(30) comment '支付状态'")
    @Enumerated(EnumType.STRING)
    private MerchantRechargePaymentStatus status = MerchantRechargePaymentStatus.WAITING;
    @Column(columnDefinition = "bigint comment '充值id'")
    private Long merchantRechargePaymentId;

    public BigDecimal getRechargeAmount() {
        return rechargeAmount;
    }

    public void setRechargeAmount(BigDecimal rechargeAmount) {
        this.rechargeAmount = rechargeAmount;
    }

    public Long getMallId() {
        return mallId;
    }

    public void setMallId(Long mallId) {
        this.mallId = mallId;
    }

    public Long getMerchantId() {
        return merchantId;
    }

    public void setMerchantId(Long merchantId) {
        this.merchantId = merchantId;
    }

    public PaymentMethod getPaymentMethod() {
        return paymentMethod;
    }

    public void setPaymentMethod(PaymentMethod paymentMethod) {
        this.paymentMethod = paymentMethod;
    }

    public MerchantRechargePaymentStatus getStatus() {
        return status;
    }

    public void setStatus(MerchantRechargePaymentStatus status) {
        this.status = status;
    }

    public Long getMerchantRechargePaymentId() {
        return merchantRechargePaymentId;
    }

    public void setMerchantRechargePaymentId(Long merchantRechargePaymentId) {
        this.merchantRechargePaymentId = merchantRechargePaymentId;
    }

    @Override
    public String toString() {
        return "MerchantRechargePaymentFlow{" +
                "id=" + id +
                ", rechargeAmount=" + rechargeAmount +
                ", dateCreated=" + dateCreated +
                ", mallId=" + mallId +
                ", lastUpdated=" + lastUpdated +
                ", merchantId=" + merchantId +
                ", paymentMethod=" + paymentMethod +
                ", isDelete=" + isDelete +
                ", version=" + version +
                ", status=" + status +
                ", merchantRechargePaymentId=" + merchantRechargePaymentId +
                '}';
    }
}
